/**************************************************************************************
 * Date 		By				Description
 * ------------------------------------------------------------------------------------
 * 03-20-07		Noah V			Created
 *
 **************************************************************************************/

namespace NAFx.Base
{
    /// <remarks>
    /// A SmartObject is managed by the SmartObjectManager for object creation and cache.
    /// Each smart object is identified by its type and an id that is unique within the type.
    /// The exact definition of the id is up to the implementation of each smart object type (class).  The only
    /// requirement from the framework is that it has to be a unique string for each instance.
    /// </remarks>
    public interface ISmartObject : IConstructable
    {
        /// <summary>
        /// Load the object (e.g. from a file or from other objects).
        /// </summary>
        /// <param name="id">a logical id to uniquely identify an object within
        /// the same type.</param>
        /// <returns>the result code</returns>
        LoadResult Load(string id);

        /// <summary>
        /// The dependency files of this object, null if no dependency.
        /// The implementing class is recommended to use lazy instantiation
        /// to avoid unnecessary resource consumption
        /// </summary>
        string[] Dependency
        { get;	}
    }
}
